//
//  Sentence.m
//  DialectShare
//
//  Created by timmy zhong on 4/4/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "Sentence.h"
#import "Const.h"

@implementation Sentence
@synthesize content = _content, uid = _uid, count = _count, sentenceId = _sentenceId;

- (void)dealloc
{
    self.content = nil;
    
    [super dealloc];
}

+ (Sentence *)sentenceWithDic:(NSDictionary *)dic
{
    Sentence *s = [[Sentence alloc] init];
    s.content = [dic objectForKey:SentenceContent];
    s.uid = [[dic objectForKey:SentenceUid] intValue];
    s.count = [[dic objectForKey:SentenceCount] intValue];
    s.sentenceId = [[dic objectForKey:SentenceId] intValue];  
    
    return [s autorelease];
}
    
@end
